package j02io;

import java.io.File;
import java.io.IOException;

/*
input，输入，磁盘到内存，输入
output，输出，从内存到磁盘，输出
 */
public class J1 {
    public static void main(String[] args) throws Exception {
        //绝对路径
        File f = new File("C:\\Users\\Administrator\\Desktop\\teach-short\\zzj240709\\_0905\\datas\\hlm.txt");
//        File f = new File("C:\\Users\\Administrator\\Desktop\\teach-short\\zzj240709\\_0905\\datas\\hlm2.txt");
//        System.out.println("f = " + f);
//        System.out.println(f.createNewFile());
//        System.out.println(f.delete());
        System.out.println(f.exists());

    }
}

class J2{
    public static void main(String[] args) {
        File f = new File("_0905/datas/hlm.txt");
        System.out.println(f.exists());
        System.out.println(f.getAbsoluteFile());
        System.out.println(f.getName());
        System.out.println(f.getParent());

        System.out.println(f.isDirectory());//false
        System.out.println(f.isFile());//true
    }
}
